﻿using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ImportForm
{
    public partial class LCQ : Form
    {
        public LCQ()
        {
            InitializeComponent();
            IWorkbook workbook = WorkbookFactory.Create(@"C:\Users\10953\Desktop\hehehe.xls");
            var sheet = workbook.GetSheetAt(0);
            var row = sheet.CreateRow(2);
            var cell = row.CreateCell(0);
            cell.SetCellValue("春秋夏冬");
            FileStream fs = new FileStream(@"C:\Users\10953\Desktop\hehehe1.xls", FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite);
            workbook.Write(fs);
            fs.Flush();
            fs.Dispose();
        }
    }
}
